﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using bi4homev3.Entidades;
using bi4homev3.Logica;

namespace bi4homev3.Paginas
{
    public partial class NuevoGasto : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["validar"].Equals("false"))
            {
                Response.Redirect("NuevoPerfil.aspx");
            }

        }

        protected void sendperfil_Click(object sender, EventArgs e)
        {
            Gastos gas = new Gastos();
           
            gas.Nombre = this.Gasto.Text;
            gas.Descripcion = this .Des.Text;
            gas.Usuario = (string) (Session["usuario"]);
            AccionesGastos crea = new AccionesGastos(gas);
            crea.insertar(gas);
            Session["mensaje"] = "insertoservicio";
            Response.Redirect("Servicios.aspx");
        }
    }
}
